<!--{include admin/top.html}-->
	<div class="mainPage">
	{if $act == 'add'}
	<script>
		function cancel(){
				window.close();
		}
		function addNew(){
			if($("#v_title").val() == ""){
				alert('请输入视频标题!');
				$("#v_title").focus();
				return false;
			}
			if($("#url").val() == ""){
				alert('请输入视频的网页地址!');
				$("#url").focus();
				return false;
			}
			$("#dosubmit").attr("disabled",true);
			alert("远程抓取较慢,请稍候...");
			$.post('{:parse_uri("admin_vod-save")}',{v_title:$("#v_title").val(),url:$("#url").val()},function(data){
				eval("var s = "+ data +";");
				if(s.result){
					alert('操作成功!');
					window.returnValue = data;
					$("#wait").hide();
					window.close();
				}else{
					alert('新增失败! 视频标题请勿重复 , 目前程序仅支持: 优库,土豆视频 !');
				}
			});
			$("#dosubmit").attr("disabled",false);
		
		}
	</script>



		<h1 class="title">新增视频 - <a href="javascript:void(0)" onclick="cancel()">返回</a></h1>
		<form action="{:parse_uri("admin_vod-save")}" method="POST"  enctype="multipart/form-data">
		<p style="line-height:25px;">
			视频标题 : <input name="v_title" id="v_title" class="ipt"/>
		</p>
		<p style="line-height:25px;">视频地址 : <input name="url" id="url" class="ipt"/> 
		</p>
		<p style="line-height:30px;text-align:left">
			<input type="button" name="submit" id="dosubmit" class="submit" onclick="addNew()" value="提交" />
			<input type="button" class="submit" onclick="cancel()" value="返回" />
		</p>
		</form>
	{/if}
		<p>&nbsp;</p>
	</div>
	<div class="cover" id="cover" >
		<div style="margin-top:20%;background:url({__PUBLIC__}/images/002.gif) repeat-x;height:16px;width:200px;border:2px solid #999">
		</div>
	</div>
</body>
</html>